package com.bprogram.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Map;

/**
 *  BuiltinExchangeType,交换机的类别枚举类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)

public class Exchange {


    /**
     * 交换机名字
     */
    private String exchange_name;
    /**
     * 是否自动应答
     */
    private boolean autoAck;
    /**
     * 交换机类型
     */
    private String type;
    /**
     * 是否持久化
     */
    private boolean durable;

    /**
     * 路由key
     */
    private String routing_key;

    /**
     * 是否自动删除
     */
    private boolean autoDelete;
    /**
     *alternate-exchange 声明一个备用交换机，一般声明为fanout类型;arguments.put("alternate-exchange",exchangeName);
     *x-delayed-type 死信交换机
     */
    private Map<String, Object> arguments;
}
